Integrand size = 28, antiderivative size = 269 \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{5/2} c^2 f}-\frac {107 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{64 \sqrt {2} a^{5/2} c^2 f}+\frac {21 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{64 a^3 c^2 f}+\frac {43 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{96 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f} \]
[Out]
Time = 0.43 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3989, 3972, 483, 593, 597, 536, 209} \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{5/2} c^2 f}-\frac {107 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{64 \sqrt {2} a^{5/2} c^2 f}+\frac {43 \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}}{96 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a \sec (e+f x)+a)^{3/2}}{16 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a \sec (e+f x)+a)^{3/2}}{32 a^4 c^2 f}+\frac {21 \cot (e+f x) \sqrt {a \sec (e+f x)+a}}{64 a^3 c^2 f} \]
[In]
[Out]
Rule 209
Rule 483
Rule 536
Rule 593
Rule 597
Rule 3972
Rule 3989
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {\cot ^4(e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx}{a^2 c^2} \\ & = -\frac {2 \text {Subst}\left (\int \frac {1}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )^3} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^4 c^2 f} \\ & = -\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f}-\frac {\text {Subst}\left (\int \frac {a-7 a^2 x^2}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{4 a^5 c^2 f} \\ & = -\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f}-\frac {\text {Subst}\left (\int \frac {-43 a^2-75 a^3 x^2}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{16 a^6 c^2 f} \\ & = \frac {43 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{96 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f}+\frac {\text {Subst}\left (\int \frac {63 a^3-129 a^4 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{96 a^6 c^2 f} \\ & = \frac {21 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{64 a^3 c^2 f}+\frac {43 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{96 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f}-\frac {\text {Subst}\left (\int \frac {447 a^4+63 a^5 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{192 a^6 c^2 f} \\ & = \frac {21 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{64 a^3 c^2 f}+\frac {43 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{96 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f}+\frac {107 \text {Subst}\left (\int \frac {1}{2+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{64 a^2 c^2 f}-\frac {2 \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^2 c^2 f} \\ & = \frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{5/2} c^2 f}-\frac {107 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{64 \sqrt {2} a^{5/2} c^2 f}+\frac {21 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{64 a^3 c^2 f}+\frac {43 \cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{96 a^4 c^2 f}-\frac {15 \cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{32 a^4 c^2 f}-\frac {\cos ^2(e+f x) \cot ^3(e+f x) \sec ^4\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{16 a^4 c^2 f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.53 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.42 \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\frac {\cot ^3(e+f x) \left (107 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {1}{2} (1-\sec (e+f x))\right ) (1+\sec (e+f x))^2-2 \left (57+45 \sec (e+f x)+32 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},1-\sec (e+f x)\right ) (1+\sec (e+f x))^2\right )\right )}{96 a^2 c^2 f \sqrt {a (1+\sec (e+f x))}} \]
[In]
[Out]
Time = 2.70 (sec) , antiderivative size = 375, normalized size of antiderivative = 1.39
method | result | size |
default | \(-\frac {\sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (321 \sqrt {2}\, \cos \left (f x +e \right ) \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}-768 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )+321 \sqrt {2}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )-768 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+410 \cos \left (f x +e \right ) \cot \left (f x +e \right )^{3}+142 \cot \left (f x +e \right )^{3}-298 \csc \left (f x +e \right ) \cot \left (f x +e \right )^{2}-126 \csc \left (f x +e \right )^{2} \cot \left (f x +e \right )\right )}{384 c^{2} f \,a^{3} \left (\cos \left (f x +e \right )+1\right )}\) | \(375\) |
[In]
[Out]
none
Time = 0.39 (sec) , antiderivative size = 706, normalized size of antiderivative = 2.62 \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\left [-\frac {321 \, \sqrt {2} {\left (\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right ) - 1\right )} \sqrt {-a} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, a \cos \left (f x + e\right )^{2} - 2 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 384 \, {\left (\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right ) - 1\right )} \sqrt {-a} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} + 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) - 4 \, {\left (205 \, \cos \left (f x + e\right )^{4} + 71 \, \cos \left (f x + e\right )^{3} - 149 \, \cos \left (f x + e\right )^{2} - 63 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{768 \, {\left (a^{3} c^{2} f \cos \left (f x + e\right )^{3} + a^{3} c^{2} f \cos \left (f x + e\right )^{2} - a^{3} c^{2} f \cos \left (f x + e\right ) - a^{3} c^{2} f\right )} \sin \left (f x + e\right )}, \frac {321 \, \sqrt {2} {\left (\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right ) - 1\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 384 \, {\left (\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right ) - 1\right )} \sqrt {a} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (205 \, \cos \left (f x + e\right )^{4} + 71 \, \cos \left (f x + e\right )^{3} - 149 \, \cos \left (f x + e\right )^{2} - 63 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{384 \, {\left (a^{3} c^{2} f \cos \left (f x + e\right )^{3} + a^{3} c^{2} f \cos \left (f x + e\right )^{2} - a^{3} c^{2} f \cos \left (f x + e\right ) - a^{3} c^{2} f\right )} \sin \left (f x + e\right )}\right ] \]
[In]
[Out]
\[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\frac {\int \frac {1}{a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )} - 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )} + a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}}\, dx}{c^{2}} \]
[In]
[Out]
\[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\int { \frac {1}{{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (c \sec \left (f x + e\right ) - c\right )}^{2}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2} \, dx=\int \frac {1}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]
[In]
[Out]